﻿using CloudStorageLight.Core.Web;
using System.ComponentModel.DataAnnotations;

namespace CloudStorageLight.Web.Models
{

    public class ManageUserViewModel
    {
        [Required]
        [DataType(DataType.Password)]
        public string OldPassword { get; set; }

        [Required]
        [DataType(DataType.Password)]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Compare("NewPassword", ErrorMessageResourceName="MsgNotMatchPassword", ErrorMessageResourceType=typeof(ViewMessages))]
        public string ConfirmPassword { get; set; }
    }

    public class LoginViewModel
    {

        public string CloudAccount { get; set; }

        [Required]
        public string Email { get; set; }

        [Required]
        [DataType(DataType.Password)]
       public string Password { get; set; }

        public bool RememberMe { get; set; }

        public bool AdminRole { get; set; }

        public string ClientToken { get; set; }
    }

    public class RegisterViewModel
    {
        [Required]
        [EmailAddress]
        public string Email { get; set; }

        [Required]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Compare("Password", ErrorMessageResourceName = "MsgNotMatchPassword", ErrorMessageResourceType = typeof(ViewMessages))]
        public string ConfirmPassword { get; set; }
    }

    public class ResetPasswordViewModel
    {
        [Required]
        [EmailAddress]
        public string Email { get; set; }

        [Required]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Compare("Password", ErrorMessageResourceName = "MsgNotMatchPassword", ErrorMessageResourceType = typeof(ViewMessages))]
        public string ConfirmPassword { get; set; }

        public string Code { get; set; }
    }

    public class ForgotPasswordViewModel
    {
        [Required]
        [EmailAddress]
        public string Email { get; set; }
    }
}
